﻿<%@CODEpage="65001"%>
<!--#include file="../inc/conn.asp"-->
<!DOCTYPE html>
<html>
<meta charset="utf-8"/>
<head>
<title>捐赠管理</title>
<link href="<%=sitepath%>theme/css/manage.css" rel="stylesheet">
<script src="<%=sitepath%>theme/js/jquery.js"></script>
<script src="<%=sitepath%>theme/js/manage.js"></script>
</head>
<%
Call OpenData()
id = request("id")
Set rsEdit = conn.execute("select * from [donate-list] where id="&CLng(id))
If Not rsEdit.eof Then
	username = rsEdit("username")
	url = rsEdit("url")
	sum = rsEdit("sum")
	email = rsEdit("email")
	alipay = rsEdit("alipay")
	ordertime = rsEdit("ordertime")
	paytime = rsEdit("paytime")
	mytrade = rsEdit("mytrade")
	trade = rsEdit("trade")
	says = rsEdit("says")
	status = rsEdit("status")
Else
	Call showmsg("该订单不存在！","back")
End if
Set rsEdit = Nothing
If request.serverVariables("request_method") = "POST" Then
	sqlSave = "select * from [donate-list] where id="&CLng(id)
	Set rsSave = server.CreateObject("adodb.recordset")
	rsSave.open sqlSave,conn,1,3
	If Not rsSave.eof Then
			rsSave("username") = request("username")
			rsSave("url") = request("url")
			rsSave("sum") = request("sum")
			rsSave("email") = request("email")
			rsSave("alipay") = request("alipay")
			rsSave("ordertime") = request("ordertime")
			rsSave("paytime") = request("paytime")
			rsSave("mytrade") = request("mytrade")
			rsSave("trade") = request("trade")
			rsSave("says") = request("says")
			rsSave("status") = request("status")
		rsSave.update
		Call showmsg("修改成功！","donate-action.asp?id="&id)
	End If
	Set rsSave = Nothing
End if
%>
<body>
<div class="mod-panel">
	<div class="inner">
		<div class="hd">
			<h1>捐赠管理</h1>
		</div>
		<div class="bd">
			<form action="?id=<%=id%>" method="post" class="mod-data ">
			<table class="mod-table table-edit">
				<tbody>
					<tr>
						<th>老板大名：</th>
						<td><input type="text" class="txt" name="username" value="<%=username%>"></td>
						<th>网址：</th>
						<td><input type="text" class="txt" name="url" value="<%=url%>"></td>
					</tr>
					<tr>
						<th>捐赠金额：</th>
						<td><input type="text" class="txt" name="sum" value="<%=sum%>"></td>
						<th>状态：</th>
						<td><input type="radio" name="status" value="0" id="chk1"<%If not status then%>checked<%End if%>><label for="chk1">未支付</label><input type="radio" name="status" value="1" id="chk2"<%If status then%>checked<%End if%>><label for="chk2">已支付</label></td>
					</tr>
					<tr>
						<th>邮箱：</th>
						<td><input type="text" class="txt" name="email" value="<%=email%>"></td>
						<th>支付宝：</th>
						<td><input type="text" class="txt" name="alipay" value="<%=alipay%>"></td>
					</tr>
					<tr>
						<th>订单时间：</th>
						<td><input type="text" class="txt" name="ordertime" value="<%=ordertime%>"></td>
						<th>支付时间：</th>
						<td><input type="text" class="txt" name="paytime" value="<%=paytime%>"></td>
					</tr>
					<tr>
						<th>本站订单：</th>
						<td><input type="text" class="txt" name="mytrade" value="<%=mytrade%>"></td>
						<th>交易订单：</th>
						<td><input type="text" class="txt" name="trade" value="<%=trade%>"></td>
					</tr>
					<tr>
						<th style="vertical-align:top">他说：</th>
						<td colspan="3"><textarea rows="2" cols="60" class="txt" name="says"><%=says%></textarea></td>
					</tr>
					<tr>
						<th></th>
						<td colspan="3"><button class="btn" type="submit">确认修改</button></td>
					</tr>
				</tbody>
			</table>
			</form>
		</div>
	</div>
</div>
<%Call CloseData()%>
</body>
</html>
